package com.stlm2.controller.footMark;

import com.stlm2.dems.service.FootMarkService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * Created by apple on 2017/10/17.
 */
@Controller
@RequestMapping("/footMarkC")
public class FootMarkController {
    @Resource
    private FootMarkService footMarkService;



    /**
     * 我的足迹
     * ffl
     * 2017-10-17 11:23:53
     * @param token
     * @param pageNu
     * @return
     */
    @ResponseBody
    @RequestMapping(value="/myFootMark.json",produces="application/json;charset=UTF-8")
    public String myFootMark(String companyCode,String token,String pageNu){
        return footMarkService.myFootMark(token, pageNu);
    }

    /**
     * 添加我的足迹
     * ffl
     * 2017-10-17 11:24:12
     * @param token
     * @param goodsId
     * @return
     */
    @ResponseBody
    @RequestMapping(value="/addFootMark.json",produces="application/json;charset=UTF-8")
    public  String addFootMark (String companyCode,String token,String goodsId){
        return footMarkService.addFootMark(token, goodsId);
    }

    /**
     * 删除我的足迹
     * ffl
     * 2017-10-17 11:24:31
     * @param token
     * @param idStr
     * @return
     */
    @ResponseBody
    @RequestMapping(value="/delFootMark.json",produces="application/json;charset=UTF-8")
    public String deleteById(String companyCode,String token,String idStr){
        return footMarkService.deleteById(token, idStr);
    }

    /**
     * 清空我的足迹
     * ffl
     * 2017-10-17 11:24:46
     * @param token
     * @return
     */
    @ResponseBody
    @RequestMapping(value="/cleanFootMarK.json",produces="application/json;charset=UTF-8")
    public  String cleanFootMark(String token){
        return footMarkService.cleanFootMark(token);
    }

    /**
     * 我的足迹 记录 个数
     * ffl
     * 2017-10-17 11:25:03
     * @param token
     * @return
     */
    @ResponseBody
    @RequestMapping(value="/myFootMarkNum.json",produces="application/json;charset=UTF-8")
    public String myFootMarkNum(String companyCode,String token){
        return footMarkService.myFootMarkNum(token);
    }
}
